Drop gtk_main_iteration
authorMatthias Clasen <mclasen@redhat.com>
Mon, 10 Feb 2020 00:38:40 +0000 (19:38 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 10 Feb 2020 04:12:32 +0000 (23:12 -0500)
This function and its cousin, gtk_main_iteration_do, are
thin wrappers around GMainContext api that should just
be used directly.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkmain.c
gtk/gtkmain.h

index 8b503f0337cae0654a32de104414438c4358317a..3d7a87b44dd403fcb964dc4fe97a8e068d66c61b 100644 (file)
@@ -4421,8 +4421,6 @@ gtk_init_check
 gtk_main
 gtk_main_level
 gtk_main_quit
-gtk_main_iteration
-gtk_main_iteration_do
 
 <SUBSECTION>
 gtk_grab_add
index 5e35e9e6af08979f6a46af0df90dad19ac9baf60..434ddac5d573aa201f06427e2ffaf81ad1b98583 100644 (file)
@@ -1152,52 +1152,6 @@ gtk_main_quit (void)
   g_main_loop_quit (main_loops->data);
 }
 
-/**
- * gtk_main_iteration:
- *
- * Runs a single iteration of the mainloop.
- *
- * If no events are waiting to be processed GTK will block
- * until the next event is noticed. If you don’t want to block
- * look at gtk_main_iteration_do() or check if any events are
- * pending with gtk_events_pending() first.
- *
- * Returns: %TRUE if gtk_main_quit() has been called for the
- *     innermost mainloop
- */
-gboolean
-gtk_main_iteration (void)
-{
-  g_main_context_iteration (NULL, TRUE);
-
-  if (main_loops)
-    return !g_main_loop_is_running (main_loops->data);
-  else
-    return TRUE;
-}
-
-/**
- * gtk_main_iteration_do:
- * @blocking: %TRUE if you want GTK to block if no events are pending
- *
- * Runs a single iteration of the mainloop.
- * If no events are available either return or block depending on
- * the value of @blocking.
- *
- * Returns: %TRUE if gtk_main_quit() has been called for the
- *     innermost mainloop
- */
-gboolean
-gtk_main_iteration_do (gboolean blocking)
-{
-  g_main_context_iteration (NULL, blocking);
-
-  if (main_loops)
-    return !g_main_loop_is_running (main_loops->data);
-  else
-    return TRUE;
-}
-
 static void
 rewrite_events_translate (GdkSurface *old_surface,
                           GdkSurface *new_surface,
index e2c349a9baf27fcbb75f29181ff3c66232450975..2554cd756778613ba0a89d3b41dbe41528f8540f 100644 (file)
@@ -116,10 +116,6 @@ GDK_AVAILABLE_IN_ALL
 guint      gtk_main_level          (void);
 GDK_AVAILABLE_IN_ALL
 void       gtk_main_quit           (void);
-GDK_AVAILABLE_IN_ALL
-gboolean   gtk_main_iteration      (void);
-GDK_AVAILABLE_IN_ALL
-gboolean   gtk_main_iteration_do   (gboolean            blocking);
 
 GDK_AVAILABLE_IN_ALL
 void       gtk_grab_add            (GtkWidget          *widget);